// PageFile.cpp : implementation file
//

#include "stdafx.h"
#include "greenftp.h"
#include "PageFile.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CPageFile property page

IMPLEMENT_DYNCREATE(CPageFile, CPropertyPage)

CPageFile::CPageFile() : CPropertyPage(CPageFile::IDD)
{
	//{{AFX_DATA_INIT(CPageFile)
	m_downExist = m_pFtpConfig->m_downExist;
	m_upExist = m_pFtpConfig->m_upExist;
	m_readCache = m_pFtpConfig->m_readCache;
	m_writeCache = m_pFtpConfig->m_writeCache;
	m_getFileTimeOnServer = m_pFtpConfig->m_getFileTimeOnServer;
	//}}AFX_DATA_INIT
}

CPageFile::~CPageFile()
{
}

void CPageFile::DoDataExchange(CDataExchange* pDX)
{
	CPropertyPage::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CPageFile)
	DDX_Control(pDX, IDC_SPIN_RCACHE, m_spinRCache);
	DDX_Control(pDX, IDC_SPIN_WCACHE, m_spinWCache);
	DDX_Radio(pDX, IDC_DOWN_EXIST1, m_downExist);
	DDX_Radio(pDX, IDC_UP_EXIST1, m_upExist);
	DDX_Text(pDX, IDC_READCACHE, m_readCache);
	DDX_Text(pDX, IDC_WRITECACHE1, m_writeCache);
	DDX_Check(pDX, IDC_SERVERFILETIME, m_getFileTimeOnServer);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CPageFile, CPropertyPage)
	//{{AFX_MSG_MAP(CPageFile)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CPageFile message handlers

BOOL CPageFile::OnInitDialog() 
{
	CPropertyPage::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_spinWCache.SetRange(1,1000);
	m_spinWCache.SetBuddy(GetDlgItem(IDC_WRITECACHE1));
	m_spinRCache.SetRange(1,1000);
	m_spinRCache.SetBuddy(GetDlgItem(IDC_READCACHE));
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
